# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#   
#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
#   Major.create(:name => 'Daley', :city => cities.first)


users = User.create(:username => "admin", :fullname => 'Admin', :password => 'admin', :password_confirmation => 'admin', :email => 'admin@catoblepa.org')
roles_list = [ 'admin', 'create', 'edit', 'delete', 'wiki', 'wiki-edit', 'anagrafiche', 'personale', 'contabilita', 'resoconti', 'tabelle', 'documenti' ]
roles = roles_list.each { |i| Role.create(:name => i) }
User.find(1).roles << Role.find(1)

tipi_visita_medica = ['visita generale', 'audiometria', 'spirometria', 'ematochimici', 'drug test'].each { |i| TipoVisitaMedica.create(:name => i, :validita => 12) }
sesso = ['M', 'F'].each { |i| Sesso.create(:name => i) }
stato_civile = ['celibe/nubile', 'sposato/a', 'divorziato/a', 'vedovo/a'].each { |i| StatoCivile.create(:name => i) }
